const app = getApp()

Page({
  data: {
    items: [{}],
    show: false,
    isInputFocus: false,
  },
  onLoad() {
    console.log('onload')
    const items = []
    for (let i = 0; i < 200; i++) {
      const item = {}
      const r = Math.floor(Math.random() * (229 - 105) + 105);//生成固定灰色
      item.bg = `background-color: rgb(${r}, ${r}, ${r})`
      items.push(item)
    }
    this.setData({ items })
  },
  tap() {
    this.setData({ show: true })
  },
  onChange(e) {
    this.setData({ 'show': !this.data.show })
  },
  onFocus(e) {
    this.setData({ 'isInputFocus': true })
  },
  onBlur(e) {
    this.setData({ 'isInputFocus': false })
  }
})
